package stackoverflow.data.repositoryimpl;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Qualifier;


public class HibernateRepository
{
	protected SessionFactory sessionFactory;

	public void setSessionFactory(
			@Qualifier("sessionFactory")SessionFactory sessionFactory)
	{
		this.sessionFactory = sessionFactory;
	}
	
	protected Session getSession()
	{
		return sessionFactory.getCurrentSession();
	}
	
}
